Skip to content

Add Swift Testing harness and SwiftUI previews#5

Open
nsd97 wants to merge 1 commit into
idevtim:mainfrom
nsd97:contrib/swift-testing-previews
Open

Add Swift Testing harness and SwiftUI previews#5
nsd97 wants to merge 1 commit into
idevtim:mainfrom
nsd97:contrib/swift-testing-previews

Conversation

@nsd97

@nsd97 nsd97 commented Jul 19, 2026

Copy link
Copy Markdown

What does this PR do?

Introduces a first-party Swift Testing unit-test target and in-file #Preview coverage so contributors can verify changes without live SMC/XPC — and updates CONTRIBUTING/AGENTS/CLAUDE/PR template so they no longer claim “no tests.”

Context

  • Issue: N/A (infra)
  • Stack: Part 1/4 — standalone; merge before the helper fix PR for the cleanest review
  • Out of scope: SMAppService helper fix, Ultra performance level, SwiftUI publish-during-update hygiene

What changed

  • Add ChillMacTests (Swift Testing) + TestPlans/Unit.xctestplan, wired via XcodeGen project.yml
  • Add ChillMac/Preview/PreviewSupport.swift factories and #Preview on views
  • Document how to run tests; PR checklist now includes unit tests
  • Zero third-party test dependencies (toolchain Swift Testing only)

Review guide

Start at: project.yml (test target) → ChillMacTests/Support/HarnessSmokeTests.swiftChillMac/Preview/PreviewSupport.swift

How to test

  1. xcodegen generate && xcodebuild -project ChillMac.xcodeproj -scheme ChillMac -destination 'platform=macOS' test
  2. Open any view with #Preview in Xcode canvas — sample data only, no live SMC/XPC
  3. Confirm app still builds/runs: xcodegen generate && xcodebuild -project ChillMac.xcodeproj -scheme ChillMac build

Checklist

  • Builds without errors (xcodegen generate && xcodebuild -scheme ChillMac build)
  • Unit tests pass (xcodebuild -project ChillMac.xcodeproj -scheme ChillMac -destination 'platform=macOS' test)
  • Tested manually in the app

Made with Cursor

Introduce PreviewSupport fixtures (no SMC/XPC in canvas), #Preview on every View, and a ChillMacTests target so previews and fixture contracts stay verifiable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant